# coding=utf-8
from django.contrib import admin
from django.conf import settings
from apps.person.models import Person

class PersonAdmin(admin.ModelAdmin):
    list_display = ('person_name_zh', 'person_identity', 'person_title_zh', 'person_homepage', 'person_image')
#    fields = ('person_name_en', 'person_name_zh', 'person_gender', 'person_image')
    list_filter = ('person_identity', 'person_title_zh', 'person_title_en')
    list_max_show_all = 1000     #   如果人放不下，改这个数字
    list_per_page = 10
    search_fields = ['person_name_zh']

    class Media:
        js = [settings.MEDIA_URL+'plugins/tiny_mce/tiny_mce_src.js', 
              #settings.MEDIA_URL+'plugins/tiny_mce/tiny_mce_config.js',
              settings.MEDIA_URL+'plugins/filebrowser/js/TinyMCEAdmin.js'
             ]

admin.site.register(Person, PersonAdmin)
